

import java.io.File;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.*;

public class test2 {
    public static void main(String[] args) {
        CountDownLatch countDownLatch = new CountDownLatch(4);
        for (int i = 1; i < 5; i++) {
            final int temp = i;
            new Thread(){
                public void run(){
                    System.out.println(ColorEnum.enumFind(temp).getColor()+"出现了");
                    countDownLatch.countDown();
                }
            }.start();
        }
        try {
            countDownLatch.await();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(Thread.currentThread().getName()+ "THE END");
        System.out.println((Runtime.getRuntime().totalMemory())/1024/1024);
        System.out.println((Runtime.getRuntime().maxMemory())/1024/1024);

    }
}